import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router'
import Layout from '../layout/index.vue'
const routes: RouteRecordRaw[] = [
  {
    path: '/',
    component: Layout,
    children: [
      {
        path: '',
        name: 'home',
        component: () => import('../pages/home/index.vue')
      },
      {
        path: '/three/course/:courseId',
        name: 'three-course',
        component: () => import('../pages/three/index.vue')
      }
    ]
  },
  {
    path: '/about',
    name: 'about',
    component: () => import('../pages/about/index.vue')
  }
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
